Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix types for reorder and drag test helpers #587

Merged
merged 1 commit into from
Oct 3, 2024

Conversation

BoussonKarel
Copy link
Contributor

@BoussonKarel BoussonKarel commented Sep 27, 2024

fixes #586

We can use Parameters<typeof find>[0] because we are passing the selectors to the find function.

  itemSelector: Parameters<typeof findAll>[0],
  ...resultSelectors: Parameters<typeof find>[0][]

or we can just copy their types

  itemSelector: keyof (HTMLElementTagNameMap | SVGElementTagNameMap) | string,
  ...resultSelectors: (keyof (HTMLElementTagNameMap | SVGElementTagNameMap) | string)[]

What's the best / cleanest / preferred method of doing this?

Copy link

netlify bot commented Sep 27, 2024

Deploy Preview for ember-sortable canceled.

Name Link
🔨 Latest commit b35613c
🔍 Latest deploy log https://app.netlify.com/sites/ember-sortable/deploys/66f65be0603dbe0008d0038b

@BoussonKarel BoussonKarel changed the title fix types for reorder and drag test helpers, fixes #586 fix types for reorder and drag test helpers Sep 27, 2024
Copy link
Contributor

@NullVoxPopuli NullVoxPopuli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems fine. If we want to change something, we can do another release!

@NullVoxPopuli NullVoxPopuli merged commit f4e784c into adopted-ember-addons:master Oct 3, 2024
22 checks passed
@github-actions github-actions bot mentioned this pull request Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Types or test-support/reorder are not correct
2 participants